var e = require('../@babel/runtime/helpers/toConsumableArray.js'),
  u = require('../@babel/runtime/helpers/classCallCheck.js'),
  t = require('../@babel/runtime/helpers/createClass.js');
module.exports = (function () {
  function s(e) {
    u(this, s), (this.taskQueue = []);
  }
  return (
    t(s, [
      {
        key: 'addTask',
        value: function (e) {
          0 === this.taskQueue.length && e(), this.taskQueue.push(e);
        },
      },
      {
        key: 'workOut',
        value: function () {
          this.taskQueue.shift(), this.taskQueue.length && this.taskQueue[0]();
        },
      },
      {
        key: 'clearnWork',
        value: function () {
          this.taskQueue = [];
        },
      },
      {
        key: 'setNewCoupon',
        value: function (u) {
          for (var t = [], s = 0; s < this.taskQueue.length; s++) {
            this.taskQueue[s].name;
          }
          (this.taskQueue = [].concat(e(u), t)),
            console.log('登录后刷新优惠券弹框 taskQueue: ', this.taskQueue),
            this.taskQueue[0]();
        },
      },
    ]),
    s
  );
})();
